# coding=utf-8
import os
import sys
import re

if __name__ == '__main__':
    def formatpath(p):
        if dirpath is not None and dirpath.strip() != "":
            if p.find("\\") != -1:
                p = re.sub(r"\\", "/", p)
                print p
            if not p.endswith("/"):
                p = p + "/"
            return p


    def listdir(dirname):
        if not os.path.exists(dirname):
            sys.exit("%s is not found" % dirname)
        if os.path.isfile(dirname):
            print ">>>>>>"+dirname
        elif os.path.isdir(dirname):
            print dirname
            files = os.listdir(dirname)
            for f in files:
                listdir(formatpath(dirname) + f)
            print "-------------"


    maindir = sys.argv[1]
    listdir(maindir)
